fix(core): honor commitment for remote account batches - #762
Open
xternet wants to merge 1 commit into
Open
Conversation
xternet
marked this pull request as ready for review
August 13, 2026 19:37
Contributor
Greptile SummaryThe PR makes the primary remote account batch honor the caller-selected commitment, aligning it with companion mint and program-account fetches.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or maintainability issues identified. The commitment-aware RPC method preserves the existing account-vector processing while ensuring both primary and dependent remote fetches use the caller-selected commitment, and the new test verifies the serialized request configuration. Important Files Changed
Reviews (1): Last reviewed commit: "fix(core): honor commitment for remote a..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SurfnetRemoteClient::get_multiple_accountsaccepts a caller-selected commitment, but its primary account batch usedRpcClient::get_multiple_accounts, which silently applied the client's default commitment. Companion mint/program-account fetches in the same method already used the requested commitment.Use
get_multiple_accounts_with_commitmentfor the primary batch as well, then extract the contextual response value. This keeps every remote account fetched by the operation at the same requested commitment.Regression test
The new test records the outgoing JSON-RPC request through a custom
RpcSender. It requestsconfirmedand asserts that thegetMultipleAccountsconfig actually contains"commitment": "confirmed"; before this patch it observed"finalized".Validation
cargo +nightly fmt --all -- --checkcargo test -p surfpool-core surfnet::remote::tests -- --test-threads=1— 3 passedcargo clippy -p surfpool-core --lib --no-default-features— completed with existing repository warnings onlygit diff --checkI also attempted the complete
surfpool-corelib suite locally. It reached 469 passing tests before the shared runner exhausted its open-file limit; the remaining failures reportedToo many open files, rather than assertion failures from this change. GitHub CI can run the full suite in its normal environment.